package com.springboot.helloworld.entity;

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.Min;
import java.io.Serializable;

/**
 * @version v1.0
 * @description: girl实体
 * @author: xiaoliang.liu
 * @date: 2018/7/1 20:34
 */
@Data
@Entity
public class Girl implements Serializable {
    private static final long serialVersionUID = 574734872877004420L;

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 年龄
     */
    @Min(value = 18, message = "不满18岁")
    private Integer age;

    /**
     * 体重
     */
    private String weight;

}
